<template>
  <div :style="{height}" class="layout flex flex-jc flex-ac">
    <slot></slot>
  </div>
</template>
<script>
import '@/assets/styles/index.scss'
export default {
  data() {
    return {
      height: 0
    };
  },
  created() {
    this.setHeight();
    window.addEventListener("resize", this.setHeight);
  },
  beforeDestroy() {
    window.removeEventListener("resize", this.setHeight);
  },
  methods: {
    setHeight() {
      this.height = document.body.clientHeight - 60 + "px";
    }
  }
};
</script>

<style lang="scss" scoped>
.layout {
  width: 100%;
  background: url("~@/assets/images/login/3_1background@2x.png") no-repeat
    center / cover;
}
</style>

